package com.ssm.serviceimp;

import com.ssm.dao.IOrderDao;
import com.ssm.dao.IUserDao;
import com.ssm.model.Order;
import com.ssm.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("orderService")
public class OrderServiceImp implements OrderService {
    @Autowired
    private IOrderDao orderDao;

    @Override
    public List<Order> selectAllOrder()
    {
        return orderDao.selectAllOrder();
    }

    @Override
    public void addOrder(Order order)
    {
        orderDao.addOrder(order);
    }

    @Override
    public List<Order> selectOrderByUsername(String username){return orderDao.selectOrderByUsername(username);}
}
